<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="/context/mytags.jsp" %>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
    <div region="center" style="padding:1px;">
        <t:datagrid name="cbsBkCertificatesList" checkbox="true" fitColumns="false" title="巴可大学证书管理"
                    actionUrl="cbsBkCertificatesController.do?datagrid" idField="id" fit="true" queryMode="group">
            <t:dgCol title="ID" field="id" hidden="true" queryMode="group" width="120"></t:dgCol>
            <t:dgCol title="姓名" field="name" query="true" queryMode="single" width="120"></t:dgCol>
            <t:dgCol title="证书号" field="certificateNum" queryMode="single" width="120"></t:dgCol>
            <t:dgCol title="过期日" field="overDate" formatter="yyyy-MM-dd" queryMode="group" width="120"></t:dgCol>
            <t:dgCol title="课程号" field="courseNum" queryMode="single" width="120"></t:dgCol>
            <t:dgCol title="身份证号" field="idNum" query="true" queryMode="single" width="140"></t:dgCol>
            <t:dgCol title="状态" field="status" hidden="true" queryMode="group" width="120"></t:dgCol>
            <t:dgCol title="createName" field="create_name" hidden="true" queryMode="group" width="120"></t:dgCol>
            <t:dgCol title="createBy" field="create_by" hidden="true" queryMode="group" width="120"></t:dgCol>
            <t:dgCol title="createDate" field="create_date" formatter="yyyy-MM-dd" hidden="true" queryMode="group"
                     width="120"></t:dgCol>
            <t:dgCol title="updateName" field="updateName" hidden="true" queryMode="group" width="120"></t:dgCol>
            <t:dgCol title="updateBy" field="update_by" hidden="true" queryMode="group" width="120"></t:dgCol>
            <t:dgCol title="updateDate" field="update_date" formatter="yyyy-MM-dd" hidden="true" queryMode="group"
                     width="120"></t:dgCol>
            <t:dgCol title="操作" field="opt" width="100"></t:dgCol>
            <t:dgDelOpt title="删除" url="cbsBkCertificatesController.do?logicDelete&id={id}"/>
            <t:dgToolBar title="录入" icon="icon-add" url="cbsBkCertificatesController.do?goAdd" funname="add" width="700"
                         height="200"></t:dgToolBar>
            <t:dgToolBar title="编辑" icon="icon-edit" url="cbsBkCertificatesController.do?goUpdate" funname="update"
                         width="700" height="200"></t:dgToolBar>
            <t:dgToolBar title="批量删除" icon="icon-remove" url="cbsBkCertificatesController.do?doBatchDel"
                         funname="deleteALLSelect"></t:dgToolBar>
            <t:dgToolBar title="查看" icon="icon-search" url="cbsBkCertificatesController.do?goUpdate"
                         funname="detail"></t:dgToolBar>
            <t:dgToolBar title="模板下载" icon="icon-put" funname="ExportXlsByT"></t:dgToolBar>
            <t:dgToolBar title="导入" icon="icon-put" funname="ImportXls"></t:dgToolBar>
            <t:dgToolBar title="导出" icon="icon-put" funname="exportIp"></t:dgToolBar>
        </t:datagrid>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        //给时间控件加上样式
        $("#cbsBkCertificatesListtb").find("input[name='overDate_begin']").attr("class", "Wdate").attr("style", "height:20px;width:90px;").click(function () {
            WdatePicker({dateFmt: 'yyyy-MM-dd'});
        });
        $("#cbsBkCertificatesListtb").find("input[name='overDate_end']").attr("class", "Wdate").attr("style", "height:20px;width:90px;").click(function () {
            WdatePicker({dateFmt: 'yyyy-MM-dd'});
        });
        $("#cbsBkCertificatesListtb").find("input[name='createDate_begin']").attr("class", "Wdate").attr("style", "height:20px;width:90px;").click(function () {
            WdatePicker({dateFmt: 'yyyy-MM-dd'});
        });
        $("#cbsBkCertificatesListtb").find("input[name='createDate_end']").attr("class", "Wdate").attr("style", "height:20px;width:90px;").click(function () {
            WdatePicker({dateFmt: 'yyyy-MM-dd'});
        });
        $("#cbsBkCertificatesListtb").find("input[name='updateDate_begin']").attr("class", "Wdate").attr("style", "height:20px;width:90px;").click(function () {
            WdatePicker({dateFmt: 'yyyy-MM-dd'});
        });
        $("#cbsBkCertificatesListtb").find("input[name='updateDate_end']").attr("class", "Wdate").attr("style", "height:20px;width:90px;").click(function () {
            WdatePicker({dateFmt: 'yyyy-MM-dd'});
        });
    });
    $(document).ready(function () {

    });
    //导入
    function ImportXls() {
        /* openuploadwin('Excel导入', 'cbsBkCertificatesController.do?upload', "cbsBkCertificatesList"); */
        createdetailwindow('巴可大学证书导入', 'cbsBkCertificatesController.do?uploadBkCertificate', 470, 150)
    }
    function exportIp() {
        var name = $("input[name='name']").val();
        var idNum = $("input[name='idNum']").val();
        myDownload("cbsBkCertificatesController.do?export&name=" + name + "&idNum=" + idNum);
    }
    //模板下载
    function ExportXlsByT() {
        JeecgExcelExport("cbsBkCertificatesController.do?exportXlsByT", "cbsBkCertificatesList");
    }
</script>